package com.itstyle.seckill.util.statusflow;

import com.alibaba.fastjson.annotation.JSONCreator;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

public enum BigOrderStatusEnum implements DbEnum<Integer> {
    WAIT_PAY(0, "待支付","待付款"),
    WAIT_SHIPPING(100, "待发货","待发货"),
    SHIPPED(101, "已发货","待收货"),
    PART_SHIPPED(102, "部分发货","待收货"),
    WAIT_DISPATCH(200, "待派单","待派单"),
    DISPATCHED(201, "已派单","已派单"),
    WAIT_SERVICE(202, "待服务","待服务"),
    SERVICING(203, "服务中","服务中"),
    UN_EXCHANGE(300, "待使用","待使用"),
    WAIT_ACCEPT(400, "待接单","待接单"),
    WAIT_DELIVER(401, "待配送","待配送"),
    DELIVERED(402, "配送中","配送中"),
    DONE(900, "交易完成","交易完成"),
    CLOSE(901, "交易关闭","交易关闭"),
    FINISH(902, "交易完结","交易完结"),
    REFUND(903, "退款单","退款单"),
//    GROUP_FAIL(1000,"拼团失败"),
//    WAIT_GROUP(1001,"差人成团"),
//    BLIND_BOX_RECOVERY(1010,"已回收"),
//    BLIND_BOX_SHIPPED(1011,"已出仓"),

    UN_OPEN(1001,"待开盒","待开盒"),
    OPENED(1002,"已开盒","已开盒"),
    BLIND_BOX_REFUND(1004,"已回收","已回收"),
    GROUP_UN_PAY(2000,"待支付","待支付"),
    GROUPING(2002,"拼团中","差#number人成团"),
    GROUP_FAIL(2004, "拼团失败","拼团失败");

    private final Integer status;
    private final String name;
    private final String bigName;

    private BigOrderStatusEnum(Integer status, String name, String bigName) {
        this.status = status;
        this.name = name;
        this.bigName = bigName;
    }
    @JsonCreator
    @JSONCreator
    public static BigOrderStatusEnum create(String value) {
        return UN_OPEN;
    }

    public Integer getStatus() {
        return this.status;
    }

    public String getName() {
        return this.name;
    }

    public String getBigName(){
        return this.bigName;
    }

    @Override
    @JsonValue
    public Integer getValue() {
        return this.status;
    }
}
